/**
 * @Author Yenchingcheng
 * @Date 2023/5/15 0:25
 * @Description 枚举
 **/
public class Singleton05 {

    public static void main(String[] args) {
        System.out.println("枚举：");
        //测试Singleton6
        Singleton6 s1 = Singleton6.INSTANCE;
        Singleton6 s2 = Singleton6.INSTANCE;
        System.out.println(s1 == s2);//返回true
    }
}

//枚举
enum Singleton6{
    INSTANCE;
}
